#ifndef		_define_h_
#define		_define_h_


//#define		u8		unsigned char
//#define		u16		unsigned int
//#define		u32		unsigned long
//
//#define		vu8		volatile unsigned char
//#define		vu16	volatile unsigned int
//#define		vu32	volatile unsigned long

typedef unsigned long  					u32;
typedef unsigned int 					u16;
typedef unsigned char  					u8;

typedef unsigned long  const 			uc32;  /* Read Only */
typedef unsigned int const 				uc16;  /* Read Only */
typedef unsigned char  const 			uc8;   /* Read Only */

typedef volatile unsigned long  		vu32;
typedef volatile unsigned int 			vu16;
typedef volatile unsigned char  		vu8;

#define TRUE		(1)
#define FALSE		(0)

#define ENABLE    	(1)
#define DISABLE   	(0)

#define ON			1
#define OFF			0


typedef struct {
	unsigned char bit0 : 1;
	unsigned char bit1 : 1;
	unsigned char bit2 : 1;
	unsigned char bit3 : 1;
	unsigned char bit4 : 1;
	unsigned char bit5 : 1;
	unsigned char bit6 : 1;
	unsigned char bit7 : 1;
	
}	bit_type;

extern	bit_type	IIC1;

extern volatile bit HF_Approach_ON ,HF_Approach_flag,bSurge_error,fist_start_flag ;
extern vu8	PotStatus ,ErrRecoveryTimer,OVP8_Cnt,check_pot_num,Time_1msCnt,Time_1sCnt,I_PanStatus,PhaseAngleStable,PhaseAngle[] ,
			PhaseDebounceCnt;

extern vu16    errorCODE_u16,protectCODE_u16,I_AcChangeTH ;
#define Fg_CheckSum_Er  IIC1.bit0   //1:NG
#define Fg_COMMEND_RD   IIC1.bit1   //
#define Fg_COMMEND_WR   IIC1.bit2   //
#define Fg_PowLimit25	IIC1.bit3	
#define Fg_PowLimit30	IIC1.bit4	

//void 	PotMoveInit(void);
void 	Voletage_PowerLimit( );
void 	Surge_Protect();
void 	Var_Init();
#endif